import { RMIObject } from "../../Engine/RMI/RMIObject";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SPlayerTask } from "./SPlayerTask";
import { Exception } from "../../Framework/Util/Exception";
type int = number;
//class AMI_ITask_getGuildTask
    
    export  class AMI_ITask_getGuildTask extends RMIObject
    {
        constructor(arg1?: Function, arg2?: Function, arg3?: any)
        {
            super(arg1, arg2);
            this.userObject = arg3;
            this.callFunction = "getGuildTask";
            return;
        }

        public /* override */ __response(arg1: SerializeStream): void
        {
            var __is: SerializeStream;
            var cycleCount: int;
            var maxCycleCount: int;
            var loopCount: int;
            var maxLoopCount: int;
            var playerTask: SPlayerTask;

            var loc1;
            cycleCount = 0;
            maxCycleCount = 0;
            loopCount = 0;
            maxLoopCount = 0;
            playerTask = null;
            __is = arg1;
            try 
            {
                cycleCount = __is.readInt();
                maxCycleCount = __is.readInt();
                loopCount = __is.readInt();
                maxLoopCount = __is.readInt();
                playerTask = new SPlayerTask();
                playerTask.__read(__is);
            }
            catch (__ex)
            {
                this.cdeException(new Exception("ExceptionCodeSerialize", Exception.ExceptionCodeSerialize));
                return;
            }
            this.cdeResponse(cycleCount, maxCycleCount, loopCount, maxLoopCount, playerTask);
            return;
        }

        public cdeResponse(arg1: int, arg2: int, arg3: int, arg4: int, arg5: SPlayerTask): void
        {
            if (this._response)  
            {
                this._response.call(null, this, arg1, arg2, arg3, arg4, arg5);
            }
            return;
        }
    }
